/**
 * 车主生日提醒
 *
 * @Author: 刘国强
 * @Date: 2019/9/12
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 已关怀
export const queryBirthdayRemind = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/queryCared`, { params });

// 再需关怀
export const queryCaringAgain = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/queryCaringAgain`, { params });

// 查询未关怀
export const queryUnBirthdayRemind = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/brithdayRemind/queryBirthdayRemind`, { params });

// 查询车主生日提醒
export const getOwnerVehicle = ownerNo => axios.get(`${SERVER.DMSCLOUD_REPAIR}/brithdayRemind/getOwnerVehicle/${ownerNo}`, {});

// 保存
export const saveRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/careSave`, params);

// 添加提醒
export const addRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/addRemind`, params);

// 查询提醒记录
export const getRemindRecord = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/remindRecord/${params.vin}/${params.ownerNo}`);

// 保存提醒记录修改
export const updateRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/updateRemind/`, params);

// 导出车主生日提醒
export const exportCompaintHandling = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/export`, { params, responseType: 'arraybuffer' });

// 导出车主生日1提醒
export const exportBirthDay = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/brithdayRemind/export/excal`, { params, responseType: 'arraybuffer' });

// 导出车主生日2提醒
export const exportBirthDay1 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/queryCared/export/excal`, { params, responseType: 'arraybuffer' });

// 导出车主生日3提醒
export const exportBirthDay2 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/birthdayRemind/queryCaringAgain/export/excal`, { params, responseType: 'arraybuffer' });
